From: revisto Date: Mon, 22 Dec 2025 21:35:03 +0000 (+0330) Subject: status/volume: Snap to 100% when over-amplification is enabled X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~39^2~1^2~12 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8a789764cbdd776c1a2cd72bc4ed08cd7b586ed7;p=gnome-shell.git status/volume: Snap to 100% when over-amplification is enabled Sound may be distorted when overamplifying. It is therefore useful to make it easier for users to select exactly 100% when allow-volume-above-100-percent is enabled, as that is the highest non-distorted value. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7279 Part-of: --- diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 0dbb2cefe..deadc16b7 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -235,8 +235,13 @@ const StreamSlider = GObject.registerClass({ _amplifySettingsChanged() { this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY); - this.slider.maximum_value = this._allowAmplified + const maxLevel = this._allowAmplified ? this.getMaxLevel() : 1; + this.slider.maximum_value = maxLevel; + + this.slider.clearMarks(); + if (this._allowAmplified) + this.slider.addMark(1); if (this._stream) this._updateVolume();